{{/*  KaTeX  */}}
{{ if eq (printf "%v" $.Site.BaseURL) "http://localhost:1313/" }}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous">
<!-- The loading of KaTeX is deferred to speed up page rendering -->
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.js" integrity="sha384-YNHdsYkH6gMx9y3mRkmcJ2mFUjTd0qNQQvY9VYZgQd7DcN7env35GzlmFaZ23JGp" crossorigin="anonymous"></script>
<!-- To automatically render math in text elements, include the auto-render extension: -->
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/contrib/auto-render.min.js" integrity="sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
<script>
  document.addEventListener("DOMContentLoaded",function(){
    renderMathInElement(
      document.body,{
        delimiters:[
          {left:"$$",right:"$$",display:!0},
          {left:"$",right:"$",display:!1},
          {left:"\\(",right:"\\)",display:!1},
          {left:"\\[",right:"\\]",display:!0}
        ]}
      )}
    )
</script>
{{ else }}
{{ $katex := resources.Get "css/katex.min.css" | minify | fingerprint }}
<link rel=stylesheet href="{{ $katex.Permalink }}" media=print onload="this.media='all',this.onload=null" crossorigin>
<script defer src="{{ .Site.BaseURL }}js/katex.min.js" crossorigin></script>
<script defer src="{{ .Site.BaseURL }}js/auto-render.min.js" crossorigin></script>
<script>
  document.addEventListener("DOMContentLoaded", function () {
    renderMathInElement(document.body, {
      delimiters: [
        { left: "$$", right: "$$", display: true },
        { left: "$", right: "$", display: false },
        { left: "\\(", right: "\\)", display: false },
        { left: "\\[", right: "\\]", display: true }
      ]
    });
  });
</script>
{{ end }}
